php request youtube video is not working [closed]

Posted by m3tsys on Pro Webmasters See other posts from Pro Webmasters or by m3tsys
Published on 2011-02-25T19:06:53Z Indexed on 2011/02/25 23:33 UTC
Read the original article Hit count: 194

Filed under:
|
|
|

what is wrong to this code?

header('Content-type: application/x-shockwave-flash');
$video_id = $_REQUEST['id'];
$content = readfile("http://www.youtube.com/watch?v=$video_id");
echo $content;

or

header('Content-type: application/x-shockwave-flash');
$video_id = $_REQUEST['id'];
$content = readfile("http://localhost/embed/player.swf?file=http://www.youtube.com/watch?v=$video_id");
echo $content;

Why this code is not working? How should look the code?

© Pro Webmasters or respective owner

Related posts about php

Related posts about video